Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add hugr-to-json encoding, and validate it #83

Merged
merged 5 commits into from
Jan 15, 2024
Merged

Conversation

aborgna-q
Copy link
Collaborator

@aborgna-q aborgna-q commented Jan 10, 2024

  • Adds a to_json method to Hugr (As well as a from_json in HugrRaw).
  • Renames validator.validate into validate_bytes, and adds a validate_json.
  • Runs the validation using both formats in the tests.

Closes #78.

Blocked by #82, since the test code throws an error otherwise.

@aborgna-q aborgna-q marked this pull request as ready for review January 10, 2024 14:56
@aborgna-q aborgna-q requested a review from mark-koch January 10, 2024 15:02
guppy/hugr/raw.py Outdated Show resolved Hide resolved
@aborgna-q aborgna-q merged commit b441a3e into main Jan 15, 2024
1 check passed
@aborgna-q aborgna-q deleted the feat/hugr-json branch January 15, 2024 11:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Hugr to json encoding
3 participants